<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>弹性盒子flex-direction和justify-content: center;</title>
    <style>
        body{
            background-color: cornflowerblue;
        }
        .box{
            height: 600px;
            line-height: 600px;
            display: flex;
            flex-direction: row;

            justify-content: center;
            align-items: center;
        }
        .box2{
            display: flex;
            flex-direction: row-reverse;
        }
        .box3{

            display: flex;
            flex-direction: row-reverse;

            justify-content: center;
            align-items: center;
        }
        .a,.b,.c{
            background-color:floralwhite;
            border: 1px solid #333333;
        }
        .d,.e,.f{
            background-color:floralwhite;
            border: 1px solid #333;
        }
        .g,.h,.r{
            background-color:floralwhite;
            border: 1px solid #333333;
        }
    </style>
</head>
<body>
<div class="box3">
    <div class="g">G</div>
    <div class="h">H</div>
    <div class="r">R</div>
</div>
<div class="box2">
    <div class="d">D</div>
    <div class="e">E</div>
    <div class="f">F</div>
</div>
<div class="box">
    <div class="a">A</div>
    <div class="b">B</div>
    <div class="c">C</div>
</div>

</body>
</html>